<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            perspective: 1000px;
            perspective-origin: 400px 100px;
            position: relative;
            margin: 0;
            height: 100vh;
            width: 100vw;
        }
        .face {
            line-height: 200px;
            font-size: 50px;
            width: 200px;
            height: 200px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            border: 5px solid red;
            text-align: center;
        }
        .face:nth-child(1) {

        }
        .face:nth-child(2) {
            transform-origin: right;
            transform: translate(-50%, -50%) translateX(-100%) rotateY(-90deg);
        }
        .face:nth-child(3) {
            transform-origin: left;
            transform: translate(-50%, -50%) translateX(100%) rotateY(90deg);
        }
        .face:nth-child(4) {
            transform-origin: bottom;
            transform: translate(-50%, -50%) translateY(-100%) rotateX(90deg);
        }
        .face:nth-child(5) {
            transform-origin: top;
            transform: translate(-50%, -50%) translateY(100%) rotateX(-90deg);
        }
        .face:nth-child(6) {
            /* transform-origin: top; */
            transform: translate(-50%, -50%) rotateY(180deg) translateZ(210px);
        }



    </style>
</head>
<body>
    <div class="face">1</div>
    <div class="face">2</div>
    <div class="face">3</div>
    <div class="face">4</div>
    <div class="face">5</div>
    <div class="face">6</div>
</body>
</html>